
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" href="../../css/style.css">
    <script src="../../js/jquery-3.4.1.js"></script>
</head>
<body>
<!--背景-->
<div class="wel" id="background-3"></div>
<!--左右两边云-->
<div class="wel" id="box">
    <div class="box-1 lefp"></div>
    <div class="box-1">
        <div class="righp"></div>
    </div>
</div>
<!--荧光点点-->
<div class="wel" id="git"></div>
<!--登录注册表-->
<div class="wel" id="from">

    <div class="box-2 le-2">
        <form action="" method="post" id="formRegist" style="margin-left: 500px">
            <div class="flrg-1">
                <h3>注册</h3>
                <div class="a">
                    <input type="text" class="in-1" name="userName" placeholder="您的用户名">
                </div>
                <div class="a">
                    <input type="password" class="in-1" name="userPwd" placeholder="输入密码">
                </div>
                <div class="a">
                    <input type="text" class="in-1" name="userPhone" placeholder="输入手机号码">
                </div>
                <div class="a">
                    <button type="button" id="dyRegist">注册</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    $(function () {
        $("#dyRegist").on("click",function () {

            var url = "../../verycdUser/dyRegist";
            var data = new FormData(document.getElementById("formRegist")) ;
            $.ajax({
                url:url,
                data:data,
                dataType:"json",
                method:"post",
                async: true,
                processData : false,
                contentType : false,
                success:function (obj) {
                    if(obj.state==1){
                        alert("注册成功");
                        location.href="Login.html";
                    }
                },
                error:function (e) {
                    alert(e);
                }
            });
        })
    })
</script>
</body>
</html>